<%--
  Created by cofey on 16/11/20.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户认证</title>
</head>
<body>
<!-- 当前位置 -->
<div id="urHere">无线南山统一管理平台<b>></b><strong>用户认证列表</strong></div>
<div class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
    <div class="filter" style="margin-top: 20px;">
        <table width="100%">
            <tr>
                <td align="right" width="10%">区域:</td>
                <td width="38%"><input name="filter_area" type="text" class="inpMain"/></td>
                <td align="right" width="10%">热点名称:</td>
                <td width="38%"><input name="filter_hotspot_name" type="text" class="inpMain"/></td>
            </tr>
            <tr>
                <td align="right" width="10%">用户账号:</td>
                <td width="38%"><input name="filter_mobile" type="text" class="inpMain"/></td>
                <td align="right" width="10%">创建时间:</td>
                <td width="38%">
                    <input name="filter_auth_begin_time" type="text" class="inpMain Wdate" onclick="WdatePicker()"
                           readonly="readonly"/> -
                    <input name="filter_auth_nd_time" type="text" class="inpMain Wdate" onclick="WdatePicker()"
                           readonly="readonly"/>
                </td>
            </tr>
            <tr>
                <td align="right" width="10%">到期时间:</td>
                <td width="38%">
                    <input name="filter_expire_begin_time" type="text" class="inpMain Wdate" onclick="WdatePicker()"
                           readonly="readonly"/> -
                    <input name="filter_expire_end_time" type="text" class="inpMain Wdate" onclick="WdatePicker()"
                           readonly="readonly"/>
                    <input name="submit" class="btnGray" type="button" value="筛选" onclick="config.loadContent();"/>
                </td>
            </tr>
            </tr>
        </table>
    </div>
    <div id="list">
        <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
            <thead>
            <tr>
                <th width="4%" align="center">序号</th>
                <th width="7%" align="center">区域</th>
                <th width="10%" align="center">热点名称</th>
                <th width="10%" align="center">AP索引</th>
                <th width="8%" align="center">用户账户</th>
                <th width="8%" align="center">接入设备IP</th>
                <th width="10%" align="center">MAC地址</th>
                <th width="8%" align="center">认证时间</th>
                <th width="8%" align="center">到期时间</th>
            </tr>
            </thead>
            <tbody></tbody>
        </table>
        <form name="selectForm" action="${ctx}/ua/content" method="post">
            <div class="g-pagebar"></div>
            <input type="hidden" name="area"/>
            <input type="hidden" name="userName"/>
            <input type="hidden" name="hotspotName"/>
            <input type="hidden" name="expireBeginTime"/>
            <input type="hidden" name="expireEndTime"/>
            <input type="hidden" name="mobile"/>
            <input type="hidden" name="authBeginTime"/>
            <input type="hidden" name="authEndTime"/>
        </form>
    </div>
</div>
<script type="text/javascript">
    var config = null;
    jQuery(function ($) {
        var $container = $('.mainBox');
        var $filter = $container.find('.filter');
        var $pagebar = $container.find('.g-pagebar');
        var $tbodyContent = $container.find('table.tableBasic tbody');
        var $selectForm = $container.find("form[name=selectForm]");
        config = {
            pagebar: $pagebar,
            init: function () {
                config.loadContent();
            },
            loadContent: function () {
                config.setQueryWhere();

                $tbodyContent.empty();
                $pagebar.off();

                var optionsPost = {
                    success: function (data) {
                        $tbodyContent.html(data);
                    }
                };
                $selectForm.ajaxSubmit(optionsPost);
            },
            setQueryWhere: function () {
                var area = $filter.find("input[name=filter_area]").val();
                var userName = $filter.find("input[name=filter_user_name]").val();
                var mobile = $filter.find("input[name=filter_mobile]").val();
                var hotspotName = $filter.find("input[name=filter_hotspot_name]").val();
                var authBeginTime = $filter.find("input[name=filter_auth_begin_time]").val();
                var authEndTime = $filter.find("input[name=filter_auth_end_time]").val();
                var expireBeginTime = $filter.find("input[name=filter_expire_begin_time]").val();
                var expireEndTime = $filter.find("input[name=filter_expire_end_time]").val();

                $selectForm.find("input[name=area]").val(area);
                $selectForm.find("input[name=mobile]").val(mobile);
                $selectForm.find("input[name=userName]").val(userName);
                $selectForm.find("input[name=hotspotName]").val(hotspotName);
                $selectForm.find("input[name=authBeginTime]").val(authBeginTime);
                $selectForm.find("input[name=authEndTime]").val(authEndTime);
                $selectForm.find("input[name=expireBeginTime]").val(expireBeginTime);
                $selectForm.find("input[name=expireEndTime]").val(expireEndTime);
            }
        }

        config.init();
    });
</script>
</body>
</html>
